<?php 
$base = basename($_SERVER['PHP_SELF']);
?>

<div id="navbar">
	<a href="index.php" <?php if($base=="index.php")echo 'class="currentPage"'; ?> >
		Karte anzeigen</a>
	&nbsp;
	<a href="districts.php" <?php if($base=="districts.php")echo 'class="currentPage"'; ?> >
		Reviere verwalten</a>
	&nbsp;
	<a href="whereabouts.php" <?php if($base=="whereabouts.php")echo 'class="currentPage"'; ?> >
		Aufenthaltsorte verwalten</a>
	<br />
	<a href="hunters.php" <?php if($base=="hunters.php")echo 'class="currentPage"'; ?> >
		J&auml;ger verwalten</a>
	&nbsp;
	<a href="phonelist.php" <?php if($base=="phonelist.php")echo 'class="currentPage"'; ?> >
		Telefonliste</a>
	&nbsp;
	<a href="settings.php" <?php if($base=="settings.php")echo 'class="currentPage"'; ?> >
		Einstellungen</a>
	&nbsp;
	<a href="login.php" <?php if($base=="login.php")echo 'class="currentPage"'; ?> >
<?php
	if (isset($_SESSION['userid']))
	{
		echo 'Logout';
	}
	else
	{
		echo 'Login';
	}
?></a>
	&nbsp;
	<a href="http://auto-labermeier.de/index.php/impressum" target="_blank">Impressum</a>
</div>
<div id="user">
<?php
	require_once('database/database.class.php');
	$db = new Database();

	if (isset($_SESSION['userid']))
	{			
		echo 'Angemeldeter Benutzer: '.$db->getHunterNickname($_SESSION['userid']);
	}
?>
</div>
